Although accelerometers are extensively used for assessing gait, limited research has evaluated the concurrent validity of these devices on less predictable walking surfaces or the comparability of different methods used for gravitational acceleration compensation. This study evaluated the concurrent validity of trunk accelerations derived from a tri-axial inertial measurement unit while walking on firm, compliant and uneven surfaces and contrasted two methods used to remove gravitational accelerations; i) subtraction of the best linear fit from the data (detrending); and ii) use of orientation information (quaternions) from the inertial measurement unit. Twelve older and twelve younger adults walked at their preferred speed along firm, compliant and uneven walkways. Accelerations were evaluated for the thoracic spine (T12) using a tri-axial inertial measurement unit and an eleven-camera Vicon system. The findings demonstrated excellent agreement between accelerations derived from the inertial measurement unit and motion analysis system, including while walking on uneven surfaces that better approximate a real-world setting (all differences <0.16 m.s−2). Detrending produced slightly better agreement between the inertial measurement unit and Vicon system on firm surfaces (delta range: −0.05 to 0.06 vs. 0.00 to 0.14 m.s−2), whereas the quaternion method performed better when walking on compliant and uneven walkways (delta range: −0.16 to −0.02 vs. −0.07 to 0.07 m.s−2). The technique used to compensate for gravitational accelerations requires consideration in future research, particularly when walking on compliant and uneven surfaces. These findings demonstrate trunk accelerations can be accurately measured using a wireless inertial measurement unit and are appropriate for research that evaluates healthy populations in complex environments.